package com.cookor.poi.modules.phy.mobile;

import com.cookor.poi.common.utils.ResultUtil;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class WxBaseController {
  protected Logger logger = LoggerFactory.getLogger(getClass());
  
  public static ResultUtil getResult() {
    return new ResultUtil(ResultUtil.SUCCESS_CODE);
  }
  
  public static Integer getTenantId(HttpServletRequest request) throws Exception {
    Object tenantId = request.getAttribute("sys_tenantId");
    if (tenantId == null)
      throw new Exception("机构id异常"); 
    return (Integer)tenantId;
  }
}
